<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>vue组件</title>
    <script src="../js/vue.js"></script>
    <style>

    </style>
</head>
<body>

    <div id="app">

    </div>

</body>
<script>

    new Vue({
        el:"#app",
        beforeCreate(){//创建之前调用
            console.log("beforeCreate")
        },
        created(){
            console.log("created")
        },
        beforeMount:function () {
            console.log("beforeMount")
        },
        mounted:function () {
            console.log("mounted")
        },
        beforeUpdate:function () {
            console.log("beforeUpdate")
        },
        updated:function () {
            console.log("updated")
        },
        beforeDestory:function () {
            console.log("beforeDestory")
        },
        destroyed:function () {
            console.log("destroyed")
        }

    })
</script>
</html>